<template>
	<view>
		<!-- 个人中心 -->
		<image src="https://img0.baidu.com/it/u=3276907380,3196236951&fm=26&fmt=auto" mode=""
			style="width: 100%;height: 580rpx;position: absolute;top: 0px;right: 0px;z-index: -1;"></image>
		<view class="xm-flex-cr xm-padding-30r" style="width: 100%;height: 510rpx;box-sizing: border-box;">
			<view class="xm-flex-r xm-align-content-center xm-justify-between" style="margin-top: 30rpx;">
				<view class="xm-fontsize-30" style="color: #FFFFFF;z-index: 1;">
					{{data!=undefined?(data.name!=undefined?data.name:"无数据"):"用户名"}}
				</view>
				<view class="xm-fontsize-30" style="color: #FFFFFF;z-index: 1;margin-left: 150rpx;">
					{{data!=undefined?(data.teleplone!=undefined?data.teleplone:"无数据"):"联系电话"}}
				</view>
			</view>

			<view class="xm-flex-r xm-justify-between xm-align-content-center">
				<view class="" style="width: 170rpx;height: 170rpx;border-radius: 170rpx;">
					<image :src="[data!=undefined?(data.imagePath!=undefined?data.imagePath:'https://img0.baidu.com/it/u=19766716,3349517949&fm=26&fmt=auto'):('https://img0.baidu.com/it/u=19766716,3349517949&fm=26&fmt=auto')]" mode=""
						style="width: 170rpx;height: 170rpx;border-radius: 170rpx;"></image>
				</view>
				<view class="xm-fontsize-30"
					style="border: 2rpx #007AFF solid;border-radius: 20rpx;color: #FFFFFF;z-index: 1;height: 60rpx;line-height: 60rpx;padding-left:10rpx;padding-right: 10rpx;" @click="tologin()">
					登录
				</view>
			</view>

		</view>

		<view class="xm-flex-r xm-align-content-center xm-justify-between xm-padding-30r"
			style="width: 96%;height: 134rpx;border-radius: 20rpx;background:linear-gradient(to right,#1f0f9f,#a3a3a3);margin: auto;z-index: 1;line-height: 74rpx;">
			<view class="xm-fontsize-30" style="color: #FFFFFF;">
				账户余额：
			</view>
			<view class="" @click="topage('to','./psifmtiom/psifmtiom')"
				style="color: #ffffff;border: #FFFFFF 2rpx solid;padding-left:10rpx;padding-right: 10rpx;box-sizing: border-box;border-radius: 20rpx;">
				个人信息
			</view>
		</view>

		<!-- 列表 -->
		<view class="xm-padding-30r xm-flex-c" style="box-sizing: border-box;">
			<view class="xm-flex-c">
				<view class="xm-flex-r xm-justify-between xm-align-content-center xm-padding-15r"
					style="align-items: center;">
					<view class="">
						订单列表
					</view>
					<image src="../../static/images/common/right_to.png" mode="widthFix" style="width: 40rpx"></image>
				</view>

				<view class=""
					style="width: 100%;border-bottom: 2rpx #c5c0c1 solid;margin-top: 20rpx;margin-bottom: 20rpx;">
				</view>
			</view>

			<view class="xm-flex-c">
				<view class="xm-flex-r xm-justify-between xm-align-content-center xm-padding-15r"
					style="align-items: center;">
					<view class="">
						修改密码
					</view>
					<image src="../../static/images/common/right_to.png" mode="widthFix" style="width: 40rpx"></image>
				</view>

				<view class=""
					style="width: 100%;border-bottom: 2rpx #c5c0c1 solid;margin-top: 20rpx;margin-bottom: 20rpx;">
				</view>

			</view>
			
			<view class="xm-flex-c">
				<view class="xm-flex-r xm-justify-between xm-align-content-center xm-padding-15r"
					style="align-items: center;">
					<view class="">
						意见反馈
					</view>
					<image src="../../static/images/common/right_to.png" mode="widthFix" style="width: 40rpx"></image>
				</view>
			
				<view class=""
					style="width: 100%;border-bottom: 2rpx #c5c0c1 solid;margin-top: 20rpx;margin-bottom: 20rpx;">
				</view>
			
			</view>


		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				data:undefined,
				id:1
			}
		},
		onLoad() {
			uni.getStorage({
				key:"token",
				success:data=>{
					console.log(data.data);
					this.id=data.data
				}
			})
			this.findon()
		},
		onShow() {
			uni.getStorage({
				key:"token",
				success:data=>{
					console.log(data.data);
					this.id=data.data
				}
			})
			this.findon()
		},
		methods: {
			tologin(){
				// console.log("asd");
				this.$api.gotoType("to",'login/login')
		
			},
			findon(){
				console.log("ads");
				this.$http("http://127.0.0.1:4399/user/findone", "post",
				{
					id:this.id,
					}, {
					'content-type': 'application/json'
				}).then(res=>{
					this.data = res.data
					console.log(this.data);
				})
			},
			topage(type,url){
				this.$api.gotoType(type,url)
			}
		}
	}
</script>

<style>

</style>
